﻿using LServer.Core.Logger;
using LServer.Model;
using LServer.Model.Logic.DBModels;
using LServer.Model.Logic.Entitys;
using LServer.Model.Managers;
using LServer.Model.Test;
using Microsoft.VisualBasic;

namespace LServer.WorldServer
{
    //世界服务器 
    internal class Program
    {
        static void Main(string[] args)
        {
            ServerConfig.Init();
            LoggerMgr.Init();
            LFRedisClient.InitRedisClient();
            DataTableManager.Init();

            foreach (var item in DataTableManager.ItemDBModel.Lst)
            {
                Console.WriteLine("item id :: " + item.Id);
            }

            //TestMongoDB.TestAdd();
            //TestMongoDB.TestSearch();

            //TestRedis.TestString();
            //TestRedis.TestHash();
            //TestRedis.TestList();
            //TestRedis.TestSet();
            //TestRedis.TestZSet();

            //Read();

            Console.WriteLine("Hello, World!");
        }

        public static  void Read()
        {
            RoleEntity entity =  RedisHelper.HGet<RoleEntity>(ServerConfig.RoleHashKey, "1");

            Console.WriteLine("从redis内从中 读取数据：" + entity.NickName);
        }
    }
}
